Optimal. Leaf size=35 \[ -\frac {2 a^2 \cot (c+d x)}{d}-\frac {2 a^2 \csc (c+d x)}{d}+a^2 (-x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.07, antiderivative size = 35, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 5, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {3886, 3473, 8, 2606, 3767} \[ -\frac {2 a^2 \cot (c+d x)}{d}-\frac {2 a^2 \csc (c+d x)}{d}+a^2 (-x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2606
Rule 3473
Rule 3767
Rule 3886
Rubi steps
\begin {align*} \int \cot ^2(c+d x) (a+a \sec (c+d x))^2 \, dx &=\int \left (a^2 \cot ^2(c+d x)+2 a^2 \cot (c+d x) \csc (c+d x)+a^2 \csc ^2(c+d x)\right ) \, dx\\ &=a^2 \int \cot ^2(c+d x) \, dx+a^2 \int \csc ^2(c+d x) \, dx+\left (2 a^2\right ) \int \cot (c+d x) \csc (c+d x) \, dx\\ &=-\frac {a^2 \cot (c+d x)}{d}-a^2 \int 1 \, dx-\frac {a^2 \operatorname {Subst}(\int 1 \, dx,x,\cot (c+d x))}{d}-\frac {\left (2 a^2\right ) \operatorname {Subst}(\int 1 \, dx,x,\csc (c+d x))}{d}\\ &=-a^2 x-\frac {2 a^2 \cot (c+d x)}{d}-\frac {2 a^2 \csc (c+d x)}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 0.04, size = 46, normalized size = 1.31 \[ -\frac {2 a^2 \cot \left (\frac {c}{2}+\frac {d x}{2}\right ) \, _2F_1\left (-\frac {1}{2},1;\frac {1}{2};-\tan ^2\left (\frac {c}{2}+\frac {d x}{2}\right )\right )}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.68, size = 42, normalized size = 1.20 \[ -\frac {a^{2} d x \sin \left (d x + c\right ) + 2 \, a^{2} \cos \left (d x + c\right ) + 2 \, a^{2}}{d \sin \left (d x + c\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.25, size = 31, normalized size = 0.89 \[ -\frac {{\left (d x + c\right )} a^{2} + \frac {2 \, a^{2}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.72, size = 50, normalized size = 1.43 \[ \frac {a^{2} \left (-\cot \left (d x +c \right )-d x -c \right )-\frac {2 a^{2}}{\sin \left (d x +c \right )}-a^{2} \cot \left (d x +c \right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.58, size = 48, normalized size = 1.37 \[ -\frac {{\left (d x + c + \frac {1}{\tan \left (d x + c\right )}\right )} a^{2} + \frac {2 \, a^{2}}{\sin \left (d x + c\right )} + \frac {a^{2}}{\tan \left (d x + c\right )}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.08, size = 24, normalized size = 0.69 \[ -a^2\,x-\frac {2\,a^2\,\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ a^{2} \left (\int 2 \cot ^{2}{\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int \cot ^{2}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int \cot ^{2}{\left (c + d x \right )}\, dx\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________